How to group a json by a nested key using Python

welcome to shbcf.ru